// 假数据
// 引入mock
import Mock from "mockjs";

Mock.mock("/admin/login", "post", function (data) {
  let admin = JSON.parse(data.body);
  if (admin.account != "10001" || admin.password != "123456") {
    return {
      code: 50013,
      message: "账号或密码异常",
      data: {},
    };
  }
  return {
    code: 20000,
    message: "成功！",
    data: {
      token: "e634b3a1003cf59a0000000665b39681|1706268297265",
    },
  };
});

Mock.mock("/admin/info", "get", function (data) {
  return {
    code: 20000,
    message: "成功！",
    data: {
      id: 1,
      name: "小透明",
      menuList:[

      ]
    },
  };
});
